﻿'========================================================================
'功能:公佈欄 商業邏輯層物件
'作者:andy
'日期: 2011/9/9 
'========================================================================

Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports System.Data


Namespace WorkFlow.BBL
    Public Class WFBillBoardBBL

        Public Function GetDataBillNo(ByVal BillNo As Integer, ByVal dbName As String) As DataTable

            Dim db1 As WorkFlow.DAO.WFBillBoardDAO = New WorkFlow.DAO.WFBillBoardDAO(dbName)
            Return db1.GetDataBillNo(BillNo)
        End Function
        Public Function GetDataUIDEdit(ByVal UID As String, ByVal dbName As String) As DataTable
            Dim db1 As WorkFlow.DAO.WFBillBoardDAO = New WorkFlow.DAO.WFBillBoardDAO(dbName)
            Return db1.GetDataUIDEdit(UID)
        End Function
        Public Sub InsertBillBoard(ByVal Subject As String, ByVal URL As String, ByVal TargetGroupID As String, ByVal CrtUID As String, ByVal CrtGroupID As String, ByVal BegDate As DateTime, ByVal EndDate As DateTime, ByVal Active As Boolean, ByVal OrderBy As String, ByVal dbName As String)
            Dim db1 As WorkFlow.DAO.WFBillBoardDAO = New WorkFlow.DAO.WFBillBoardDAO(dbName)
            db1.InsertBillBoard(Subject, URL, TargetGroupID, CrtUID, CrtGroupID, BegDate, EndDate, Active, OrderBy)
        End Sub

        Public Sub UpdateBillBoard(ByVal BillNo As Integer, ByVal Subject As String, ByVal URL As String, ByVal TargetGroupID As String, ByVal CrtUID As String, ByVal CrtGroupID As String, ByVal BegDate As DateTime, ByVal EndDate As DateTime, ByVal Active As Boolean, ByVal OrderBy As String, ByVal dbName As String)
            Dim db1 As WorkFlow.DAO.WFBillBoardDAO = New WorkFlow.DAO.WFBillBoardDAO(dbName)
            db1.UpdateBillBoard(BillNo, Subject, URL, TargetGroupID, CrtUID, CrtGroupID, BegDate, EndDate, Active, OrderBy)
        End Sub

        Public Function GetDataUID(ByVal UID As String, ByVal dbName As String) As DataTable
            Dim db1 As WorkFlow.DAO.WFBillBoardDAO = New WorkFlow.DAO.WFBillBoardDAO(dbName)
            Return db1.GetDataUID(UID)
        End Function

    End Class


End Namespace


